package com.proj.util;

import com.proj.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class OverdueOrdersCancelled {

    @Autowired
    IOrderService orderService;


//    1000毫秒等60个，就是60秒，可以再乘10，让时间来到10分钟
    @Scheduled(fixedRate = 1000*60)
    public void overdueOrdersCancelled() {
        orderService.overdueOrdersCancelled();
    }

}
